.main-nav {
    position: absolute;
    top: $top-bar-h-small;
    right: 5px;
    width: 240px;
    height: 0;
    background-color: rgba(255,255,255,1);
    overflow: hidden;
    @include boxShadow(0px 10px 5px -10px rgba(0,0,0,0.2) inset);
    @include transition(0.3s);
}
body.menu-on {
    .main-nav {
        height: auto;
        padding-top: 10px;
        padding-bottom: 56px;
    }
    .overlay{
        display: block;
        position: fixed;
        top: $top-bar-h-small;
        right: 0px;
        bottom: 0;
        left: 0;
        background-color: rgba( 0, 0, 0, 0.3 );
    }
}

.nav-icon-link {
    display: block;
    padding: 0 15px;
    height: 35px;
    line-height: 35px;
    font-size: $fz-normal;
    .fa {
        font-size: 14px;
        vertical-align: -1px;
        &.fa-user {            color: #00B3B3; }
        &.fa-sign-in {         color: #4FB541; }
        &.fa-question-circle { color: #BDBDAE; }
        &.fa-undo {            color: #F58020; }
        &.fa-heart {           color: #FF7373; }
        &.fa-cogs {            color: #53B447; }
        &.fa-sign-out {        color: #BDBDAE; }
    }
    span {
        margin-left: 10px;
    }
    &:hover, &:focus {
        background-color: #FAFAF7;
    }
}

.main-nav-foot {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    margin-top: 15px;
    padding: 0 10px;
    border-top: 1px solid $ml-border-color-alt;
    font-size: $fz-normal;
    color: #ccc;
    span {
        line-height: 40px;
        
        a {
            display: inline;
            padding: 0;
            color: #ccc;
            &:hover, &:focus{
                color: $ml-main-color;
            }
        }
    }
    .social {
        float: right;
        a {
            display: inline-block;
            margin: 9px 3px;
            width: 22px;
            height: 22px;
            line-height: 22px;
            text-align: center;
            color: $ml-gray;
            background-color: $ml-border-color;
            @include borderRadius(50%);
            &:hover, &:focus {
                color: #FFF;
                background-color: $ml-main-color;
            }
        }
    }
}


.user-menu{
    @include transition (0.3s);
}

#toggle-menu {
    float: right;
    height: $top-bar-h-small - 1px;
    text-align: center;
    font-size: 1.3125em;
    color: $ml-gray;
    cursor: pointer;
    
    .user-avatar{
        display: none;
        margin: 8px 10px;
        width: 34px;
        height: 34px;
        line-height: 34px;
        vertical-align: top;
    }
    
    i{
        line-height: $top-bar-h-small - 1px;
        margin: 0 15px;
        font-size: 14px;
        vertical-align: top;
    }
    &:hover{
        color: $ml-main-color;
    }
}

@include min-screen($vw-small) {
    .main-nav {
        top: $top-bar-h-large;
    }
    
    #toggle-menu {
        height: $top-bar-h-large - 1px;
        
        i{
            line-height: $top-bar-h-large - 1px;
        }
    }
    body.signed #toggle-menu .user-avatar {
        display: inline-block;
        margin-top: 13px;
    }
}

@include min-screen($vw-medium) {
    .main-nav{
        float: right;
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        margin: 0;
        padding: 0;
        height: auto;
        width: auto;
        background-color: transparent;
        overflow: visible;
        @include boxShadow(none);
        li{
            vertical-align: top;
            display: inline-block;
        }
        .right{
            float: right;
        }
    }
    
    .nav-icon-link {
        display: block;
        padding: 0 10px;
        height: $top-bar-h-large - 1px;
        line-height: $top-bar-h-large - 1px;
        .fa {
            display: none;
        }
        span {
            margin: 0;
        }
        &:hover, &:focus {
            color: $ml-main-color;
            background-color: transparent;
        }
    }
    
    .user-menu{
        position: absolute;
        top: $top-bar-h-large;
        right: -5px;
        margin-right: -92px;
        border: 1px solid $ml-border-color;
        border-top: none;
        width: 150px;
        height: 0;
        background-color: #FFF;
        overflow: hidden;
        @include boxShadow(0px 10px 5px -10px rgba(0,0,0,0.2) inset);
        @include boxSizing(border-box);
        
        ul{
            position: absolute;
            right: 0;
            bottom: 0;
            left: 0;
        }
        li{
            display: block;
        }
        
        .nav-icon-link {
            height: 35px;
            line-height: 35px;
            
            .fa {
                display: inline-block;
            }
            
            span {
                margin-left: 10px;
            }
            
            span {
                margin-left: 10px;
            }
            
            &:hover, &:focus {
                color: $ml-black;
                background-color: #FAFAF7;
            }
        }
    }
    
    body.menu-on{
        .user-menu{
        height: 150px;
        }
        .main-nav {
            padding: 0;
        }
        .overlay{
            background-color: rgba( 0, 0, 0, 0 );
        }
    }
    .main-nav {
        padding: 0;
        height: auto;
    }
    .main-nav-foot {
        display: none;
    }
    
    body:not(.signed) #toggle-menu {
        display: none;
    }
}